import request from '@/utils/request'

// 获取评论列表
export function getapi(current, size) {
    return request({
        url: '/admin/comments/getComments',
        method: 'get',
        params: { current, size }
    })
}

// 新增评论
export function addapi(data) {
    return request({
        url: '/admin/comments/addComments',
        method: 'post',
        data
    })
}

// 修改评论
export function updateapi(data) {
    return request({
        url: '/admin/comments/updateComments',
        method: 'put',
        data
    })
}

// 删除评论
export function deleteapi(id) {
    return request({
        url: '/admin/comments/deleteComments',
        method: 'delete',
        params: { id }
    })
}
